<div>
    <div id="id_story_{{ story.key.id }}" class="story">
        <div class="title" id="id_tooltip_title_{{ story.key.id }}">
            <span id="id_name_{{ story.key.id }}" class="float_left">
                <span>[</span>
                <span><a href="#" id="edit_{{ story.key.id }}" value="{{ story.key.id }}">Edit</a></span> |
                <span><a href="#" id="move_{{ story.key.id }}" value="{{ story.key.id }}">Move</a></span>
                <span>]</span>
                <span class="name mensaje">
                    <a href="#" id="title_{{ story.key.id}}" name="{{ story.key.id}}" title="Show details">{{ story.name|escape }}</a>
                </span>
            </span>
            <div id="id_name_div_{{ story.key.id }}" class="hide float_left">
                <form action="/reqajax/planning_name_form" method="post" id="name_form_{{ story.key.id }}">
                    <input type="hidden" name="story_id" value="{{ story.key.id }}">
                    <input type="text" name="name" id="name_{{story.key.id}}" size="50" class="text ui-widget-content ui-corner-all">
                    <button  title="Save" type="button" class="ui-button_custom save">
                        <span>Save</span>
                    </button >
                    <button  title="Cancel" type="button" class="ui-button_custom cancel">
                        <span>Cancel</span>
                    </button >
                </form>
            </div>
            <div id="id_move_div_{{ story.key.id }}" class="hide float_left">
                <form action="/reqajax/move_story" method="post" id="move_form_{{ story.key.id }}">
                    <input type="hidden" name="story_id" value="{{ story.key.id }}">
                    <select name="story_container" id="id_story_container" class="select ui-widget-content ui-corner-all">
                        {% for container in iteration.get_containers %}
                        <option value="{{ container.key }}">{{ container.name }}</option>
                        {% endfor %}
                    </select>
                    <button  title="Save" type="button" class="ui-button_custom save">
                        <span>Save</span>
                    </button >
                    <button  title="Cancel" type="button" class="ui-button_custom cancel">
                        <span>Cancel</span>
                    </button>
                </form>
            </div>
        </div>
        <div class="progress_container">
            <div class="story_detail">
                <span class="date float_left" id="id_tooltip_assigned_{{ story.key.id }}"> Assigned to:
                    <a href="#" class="mensaje" id="id_assigned_to_{{ story.key.id }}" title ="Updated" value="{{ story.key.id }}">{{ story.assigned_to }}</a>&nbsp;|&nbsp;</span>
                <div id="id_assigned_to_div_{{ story.key.id }}" class="hide float_left">
                    <form action="/reqajax/planning_assign_form" method="post" id="assign_form_{{ story.key.id }}">
                        <input type="hidden" name="story_id" value="{{ story.key.id }}">
                        <select name="assigned_to" id="assigned_to" class="select ui-widget-content ui-corner-all">
                            {% for member in iteration.get_project.get_members %}
                            <option value="{{ member.key.id }}">{{ member.user.nickname }}</option>
                            {% endfor%}
                        </select>
                        <button  title="Save" type="button" class="ui-button_custom save">
                            <span>Save</span>
                        </button >
                        <button  title="Cancel" type="button" class="ui-button_custom cancel">
                            <span>Cancel</span>
                        </button >
                    </form>
                </div>
                <span class="date float_left" id="id_tooltip_category_{{ story.key.id }}"> Category:
                    <a href="#" id="id_category_{{ story.key.id }}" value="{{ story.key.id }}">{{ story.category }}</a>&nbsp;|&nbsp;
                </span>
                <div id="id_category_div_{{ story.key.id }}" class="hide float_left">
                    <form action="/reqajax/planning_category_form" method="post" id="category_form_{{ story.key.id }}">
                        <input type="hidden" name="story_id" value="{{ story.key.id }}">
                        <select name="category" class="select ui-widget-content ui-corner-all">
                            <option value="Feature" selected="selected">Feature</option>
                            <option value="Bug">Bug</option>
                        </select>
                        <button  title="Save" type="button" class="ui-button_custom save">
                            <span>Save</span>
                        </button >
                        <button  title="Cancel" type="button" class="ui-button_custom cancel">
                            <span>Cancel</span>
                        </button >
                    </form>
                </div>
                <span class="date float_left" id="id_tooltip_priority_{{ story.key.id }}"> Priority:
                    <a href="#" id="id_priority_{{ story.key.id }}" value="{{ story.key.id }}">{{ story.priority }}</a>&nbsp;|&nbsp;
                </span>
                <div id="id_priority_div_{{ story.key.id }}" class="hide float_left">
                    <form action="/reqajax/planning_priority_form" method="post" id="priority_form_{{ story.key.id }}">
                        <input type="hidden" name="story_id" value="{{ story.key.id }}">
                        <select name="priority" class="select ui-widget-content ui-corner-all">
                            <option value="Very High">Very High</option>
                            <option value="High">High</option>
                            <option value="Normal" selected="selected">Normal</option>
                            <option value="Low">Low</option>
                            <option value="Very Low">Very Low</option>
                        </select>
                        <button  title="Save" type="button" class="ui-button_custom save">
                            <span>Save</span>
                        </button >
                        <button  title="Cancel" type="button" class="ui-button_custom cancel">
                            <span>Cancel</span>
                        </button >
                    </form>
                </div>

                <span class="date float_left" id="id_tooltip_time_{{ story.key.id }}">Hours:
                    <a href="#" id="id_estimated_time_{{ story.key.id }}" value="{{ story.key.id }}">{{ story.estimated_time }}</a></span>
                <div id="id_estimated_time_div_{{ story.key.id }}" class="hide float_left">
                    <form action="/reqajax/planning_time_form" method="post" id="time_form_{{ story.key.id }}">
                        <input type="hidden" name="story_id" value="{{ story.key.id }}">
                        <input type="text" name="time" class="text ui-widget-content ui-corner-all"  size="1">
                        <button  title="Save" type="button" class="ui-button_custom save">
                            <span>Save</span>
                        </button >
                        <button  title="Cancel" type="button" class="ui-button_custom cancel">
                            <span>Cancel</span>
                        </button >
                    </form>
                </div>
            </div>
        </div>
        <div id="story_box_{{story.key.id}}" style="display: none" class="story_body">
            <div class="note  ui-corner-all">
                <div class="header ui-widget-content ui-corner-top" id="id_tooltip_desc_{{story.key.id}}">
                    <span>Description</span>
                    <span class="person"><a href="#">{{ story.opened_by }}</a></span>&nbsp;
                    <span>{{story.opened_date|date:"D, M j, Y"}}</span>
                    <nobr>
                        <span style="cursor: pointer;" id="edit_desc_{{story.key.id}}" value="{{story.key.id}}">
                            <span><img
                                    src="/static/css/images/edit.png"
                                    width="16" height="16" border="0" alt="Edit" title="Edit"></span></span>
                    </nobr>
                </div>
                <div class="body ui-widget-content ui-corner-bottom">
                    <span id="id_desc_{{story.key.id}}"><pre id="id_desc_pre_{{story.key.id}}" class="text">{{ story.description|escape}}</pre></span>
                    <div id="edit_form_{{story.key.id}}" class="hide">
                        <form action="/reqajax/edit_ip_description" method="post" id="edit_description_form_{{story.key.id}}">
                            <input type="hidden" name="story_id" id="story_id" value="{{ story.key.id }}">
                            <li>
                                <textarea cols="75" rows="5" id="description_{{story.key.id}}" name="description" class="text ui-widget-content ui-corner-all"></textarea>
                            </li>
                            <li>
                                <button  title="Save" type="button" class="save_">
                                    <span>Save</span>
                                </button >
                                <button  title="Cancel" type="button" class="cancel_">
                                    <span>Cancel</span>
                                </button >
                            </li>
                        </form>
                    </div>
                </div>
            </div>
            <div id="tabs-1" class="comments">
                <ul>
                    <li>
                        <ul id="comments_{{story.key.id}}" class="commentList">
                            {% for comment in story.planning_comments %}
                            <li>
                                <div>
                                    <a href="#" >{{comment.author.nickname}}</a>
                                    <span >{{comment.text}}</span>
                                </div>
                            </li>
                            {% endfor %}
                        </ul>
                    </li>
                    <li>
                        <div>
                            <form action="/reqajax/comment_planning_story" method="post" id="comment_story_{{ story.key.id }}">
                                <input type="hidden" name="story_id" value="{{ story.key.id }}">
                                <div>
                                    <div>
                                        <textarea name="comment" title="Write a comment..." placeholder="Write a comment..." class="text ui-widget-content ui-corner-all" ></textarea>
                                    </div>
                                    <div>
                                        <input value="Comment" name="comment" type="submit" >
                                    </div>
                                </div>
                            </form>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>